package com.liu.activiti.service.impl;

import com.liu.activiti.mapper.LoginMapper;
import com.liu.activiti.po.User;
import com.liu.activiti.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName LoginServiceImpl
 * @Author ：name
 * @Date ：2022-01-25 14:06
 * @Description：
 * @Version: 1.0
 */
@Transactional(propagation= Propagation.REQUIRED,isolation= Isolation.DEFAULT,timeout=5)
@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    LoginMapper loginmapper;


    @Override
    public String getpwdbyname(String name) {
        User s=loginmapper.getpwdbyname(name);
        if(s!=null){
            return s.getPassword();
        }

        else{
            return null;
        }

    }

}
